<include file="Index/header" />

<div class="container">
	<nav class="navbar navbar-default" role="navigation">
		<!-- 这里是订单查询 -->
		<ul class="nav navbar-nav navbar-left">
			<li><a href="?m=admin&c=user&a=showList" class="glyphicon glyphicon-arrow-right">返回<span
						class="sr-only">(current)</span></a></li>
			<li class="dropdown">
				<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
					aria-expanded="true">查看订单 <span class="caret"></span></a>
				<ul class="dropdown-menu">
					<li><a href="?m=admin&c=user&a=personOrder&uid={$user_id}">全部订单</a></li>
					<li role="separator" class="divider"></li>
					<li><a href="?m=admin&c=user&a=personOrder&os=1&uid={$user_id}">待发货</a></li>
					<li><a href="?m=admin&c=user&a=personOrder&os=2&uid={$user_id}">待收货</a></li>
					<li><a href="?m=admin&c=user&a=personOrder&os=3&uid={$user_id}">已收货</a></li>
				</ul>
			</li>
		</ul>
	</nav>

	<table class="table table-hover table-bordered">
		<thead>
			<tr>
				<th> 订单编号 </th>
				<th> 分类编号 </th>
				<th> 分类名称 </th>
				<th> 商品名称 </th>
				<th> 订单金额 </th>
				<th> 订单状态 </th>
				<th> 联系电话 </th>
				<th> 收货人 </th>
				<th> 收货地址 </th>
				<th> 下单时间 </th>
				<th> 操作 </th>
			</tr>
		</thead>
		<tbody>
			<foreach name="orderInfo" item="value">
				<tr>
					<td> {$value.order_id} </td>
					<td> {$value['category_id']} </td>
					<td>{$value.category_name} </td>
					<td>{$value['goods_name']} </td>
					<td> {$value.order_money} </td>
					<td> <span class="label label-default">{$value.shipping_status}</span> </td>
					<td> {$value.shipping_phone}</td>
					<td> {$value.shipping_user} </td>
					<td> {$value.shipping_adress} </td>
					<td> {$value.pay_time} </td>
					<td>
						<neq name="value.shipping_status" value="已收货">
							<a href="?m=admin&c=order&a=update&oi={$value.order_id}"
								class="btn btn btn-warning ">物流状态</a>
							<else />
							<a href="#" class="btn btn btn-default disabled">已收货</a>
						</neq>
						<a href="?m=admin&c=order&a=passPort" class="btn btn-sm btn-default ">查看物流</a>
						<a href="?m=admin&c=order&a=deleteOrder&oi={$value.order_id}" class="btn btn-sm btn-danger"
							onclick="return move()">删除订单</a>
					</td>
				</tr>
			</foreach>
		</tbody>
	</table>
</div>

<script type="text/javascript">
	function move() {
		if (window.confirm("是否删除该订单！")) {
			return true;
		}
		return false;
	}
</script>
<include file="Index/footer" />